package com.tw.community.components{
	
	import flash.text.StyleSheet;
	
	import mx.controls.TextArea;

	public class SupSubTextArea extends TextArea
	{
		[Embed(source='/assets/fonts/ARIALSUP.ttf', fontName='Arial', mimeType='application/x-font' )] 
		private var baseFont:Class;
		
		[Embed(source='/assets/fonts/ARIALSUP.ttf', fontName='ArialSup', mimeType='application/x-font')] 
		private var superscriptFont:Class;

		[Embed(source='/assets/fonts/ARIALSUB.ttf', fontName='ArialSub', mimeType='application/x-font')] 
		private var subscriptFont:Class;
        
		public function SupSubTextArea()
		{
			super();
		}
		
		override protected function createChildren():void
	    {
	        super.createChildren();
	        var ss:StyleSheet = new StyleSheet();
	        
	        if(this.styleSheet == null){
	        	this.styleSheet = new StyleSheet();
	        }
			this.styleSheet.setStyle("sup", { display: "inline", fontFamily: "ArialSup", fontWeight:"normal"});
	       	this.styleSheet.setStyle("sub", { display: "inline", fontFamily: "ArialSub"});
	       	
	       	this.setStyle("fontFamily", "Arial");
	       	
	   
	    }
		
	}
}